package com.android.lovely.ui.activity

import android.os.Bundle
import androidx.fragment.app.findFragment
import com.android.lovely.R
import com.android.lovely.databinding.ActivityCreateWorkBinding
import com.android.lovely.framework.BaseActivity
import com.android.lovely.ui.fragment.WorkActivityFragment
import com.android.lovely.ui.fragment.WorkFragment
import com.kotlin.extensions.view.ViewExt.addStatusBarMarginTop
import com.kotlin.extensions.view.ViewExt.clickable

/**
 *
 * @author why
 * @date 2025/4/14 15:38
 */
class CreateWorkActivity: BaseActivity<ActivityCreateWorkBinding>() {
    override fun initView(savedInstanceState: Bundle?) {
        mBinding.flTop.addStatusBarMarginTop()
        mBinding.back.clickable {
            onBack()
        }
        val task = getIntent().getBooleanExtra("task", false)
        val fragment = WorkActivityFragment().apply {
            arguments = Bundle().apply {
                putBoolean("task", task)
            }
        }
        supportFragmentManager.beginTransaction()
            .replace(R.id.face_container, fragment).commitNowAllowingStateLoss()
    }
}